package vno.fux.res.pool
{
	import flash.utils.Dictionary;
	
	import vno.fux.res.manager.LoadState;
	import vno.fux.res.manager.ResourceManager;
	public class MinimapResource extends UiResource
	{
		use namespace RM_URM;
		RM_URM var _border:AutoBitmap;
		public function MinimapResource(id_:uint)
		{
			super(id_);
		}
		
		public function get border():AutoBitmap
		{
			if(_loadStateDic[_border] == LoadState.NOT_LOAD)
			{
				_loadStateDic[_border] = LoadState.PRE_LOAD;
				ResourceManager.getInstance().ui.load(id);
			}
			return _border;
		}
		
		override public function create():void
		{
			this._loadStateDic = new Dictionary(true);
			_border = new AutoBitmap;
			this._loadStateDic[_border] = LoadState.NOT_LOAD;
		}
		
		override public function destroy():void
		{
			_border.detachAll();
			_border.dispose();
			_border = null;
			this._loadStateDic = null;
		}
	}
}